import Vue from 'vue'
import App from './App.vue'

//注册路由
import router from '@/router'
//注册vuex
import store from '@/store'
//注册全局组件Header
import Header from '@/components/Header'
Vue.component(Header.name, Header)
//注册全局组件Footer
import Footer from '@/components/Footer'
Vue.component(Footer.name, Footer)
//注册全局组件TypeNav
import Typenav from "@/components/Typenav"
Vue.component(Typenav.name, Typenav)
//全局注册组件Carousel
import Carousel from "@/components/Carousel"
Vue.component(Carousel.name, Carousel)

//引入mock
import "@/mock/serve.js"
//引入swiper样式
import "swiper/css/swiper.css"
//引入API所有的方法
import * as API from "@/api"
//引入element-ui
import { Button,MessageBox } from "element-ui";
Vue.use(Button)
Vue.prototype.$msg=MessageBox
Vue.prototype.$alert=MessageBox.alert

Vue.config.productionTip = false


new Vue({
  router,
  store,
  render: h => h(App),
  beforeCreate() {
    Vue.prototype.$bus = this
    Vue.prototype.$API= API
  },
}).$mount('#app')
